package com.designpattern.demo.design1;

import com.designpattern.demo.R;
import com.designpattern.demo.ui.BaseActivity;

public class SimpleFactoryActivity extends BaseActivity {

    @Override
    protected int getContentResId() {
        return R.layout.activity_simple_factory;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        Operation operation = OperationFactory.createOperation("+");
        operation.setNumber_a(10);
        operation.setNumber_b(10);
        try {
            double result = operation.getResult();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
